<template>
  <div class="right-item hw-box-style-flex">
    <div class="open-box" @click.stop="look" :style="{ background: `url(${publicUrls + 'assets/img/tabOpen.png'})` }">
      <i class="doorIcon" v-if="store.glanceOver">&#xe639;</i>
      <i class="doorIcon" v-else>&#xe638;</i>
    </div>
    <div class="right-tab" v-if="store.glanceOver">
      <slot name="right-tab"></slot>
    </div>
    <div class="right-content" v-if="store.glanceOver">
      <slot name="right-content"></slot>
    </div>
  </div>
</template>

<script setup lang="ts">
import { publicUrls } from '@/utils/minxin';
import { useProjectStore } from '@/store';

const store = useProjectStore();
const look = () => {
  store.setglanceOver();
};
if (!store.glanceOver) {
  store.setglanceOver();
}
</script>

<style lang="less" scoped>
.right-item {
  position: relative;
  width: 100%;
  height: 100%;

  background: #ffffff;
  flex-direction: column;
  border-left: 1px solid rgba(240, 240, 240, 1);
}
.right-tab {
  width: 100%;
  background: #ffffff;
}
.right-content {
  width: 100%;
}
.right-content {
  background: #ffffff;
}
.open-box {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: absolute;
  top: 240px;
  left: -12.5px;
  width: 13px;
  height: 92px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  .doorIcon {
    color: RGBA(172, 172, 172, 1);
    font-size: 12px;
  }
}
</style>
